#include <kvs/StructuredVolumeObject>
#include <kvs/StochasticUniformGridRenderer>
#include <kvs/HydrogenVolumeData>
#include <kvs/glut/Application>
#include <kvs/glut/Screen>
#include "StochasticUniformGridRenderer.h"
#include "StochasticPartialUniformGridRenderer.h"

/*===========================================================================*/
/**
 *  @brief  Main function.
 *  @param  argc [i] argument counter
 *  @param  argv [i] argument values
 */
/*===========================================================================*/
int main( int argc, char** argv )
{
    kvs::glut::Application app( argc, argv );
    kvs::glut::Screen screen( &app );
    screen.setGeometry( 0, 0, 512, 512 );
    screen.setTitle( "RayCastingRenderer" );
    screen.show();

    typedef kvs::HydrogenVolumeData Hydrogen;
    typedef kvs::StructuredVolumeObject Object;
//    typedef kvs::StochasticUniformGridRenderer Renderer;
//    typedef doga::StochasticUniformGridRenderer Renderer;
    typedef StochasticPartialUniformGridRenderer Renderer;

    Object* object = new Hydrogen( kvs::Vector3ui( 32, 32, 32 ) );
    Renderer* renderer = new Renderer();
    renderer->enableLODControl();
    renderer->setRepetitionLevel( 10 );
    renderer->setOffset( kvs::Vec3i( 10, 10, 10 ) );
    renderer->setDimension( kvs::Vec3ui( 10, 10, 10 ) );

    screen.registerObject( object, renderer );

    return app.run();
}
